package Render;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.*;

import Classe.Restaurant;


public class RestaurantRender extends JLabel implements ListCellRenderer<Restaurant> {

	private JPanel panel;


	@Override
	public Component getListCellRendererComponent(JList<? extends Restaurant> list,
			Restaurant pResto, int index, boolean isSelected, boolean CellHasFocus) {
		if(pResto!=null){
			setText(pResto.getNom());
			if(isSelected)
				setBackground(new Color(184,207,229,194));	
			else
				setBackground(new Color(255,255,255,194));
			setOpaque(true);
			setSize(100, 100);


		}else{
			setText("Aucun Resto");
		}
		
			return this;
	

	}
}
